fix(sdk): make the install tree usable - #11
Closed
201815054 wants to merge 1 commit into
Closed
Conversation
This was referenced Aug 6, 2026
201815054
force-pushed
the
sdk/install-tree
branch
from
August 6, 2026 09:02
95d1932 to
3ae4a5a
Compare
`cmake --install` produced a tree that could not build or run a generated
model.
- Generated code includes `visp/nn.h` and helpers from `src/util/`, neither
of which was installed.
- There was no runner source to compile a generated `<Arch>.cpp` against, so
consumers copied one out of the source tree by hand.
- The installed `libvisioncpp.so` records `libggml.so.0` in DT_NEEDED but
had no RUNPATH. Linking succeeded and startup failed with
"libggml.so.0: cannot open shared object file" -- the linker resolves the
path CMake gives it, the loader searches again at run time and had nothing
to go on. Every consumer worked around it with LD_LIBRARY_PATH.
Installs the missing headers, installs the existing generic runner
`tools/verify/backbone/run_dump.cpp` as `VISP_RUNNER` in the package config,
and sets `CMAKE_INSTALL_RPATH` to `$ORIGIN`. ggml installs next to
libvisioncpp, so the loader finds it with no environment variable.
The runner gains two switches it needs to be useful outside this tree:
`VISP_BACKEND=cpu` forces the CPU device, because `backend_init()` picks an
accelerator backend that a build may include but a machine may not have; and
`VISP_DUMP_NODES=<dir>` writes every named intermediate, because comparing
only the final output says that something diverged, not where.
Verified by building a generated model against the install tree with nothing
but find_package(visioncpp): it links, runs, and writes its output.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
201815054
force-pushed
the
sdk/install-tree
branch
from
August 6, 2026 09:04
3ae4a5a to
b16d8a5
Compare
Collaborator
Author
|
Closing while a larger issue is investigated: with a trained checkpoint the pipeline does not reproduce the reference detections. Reproduced on main, so it predates these changes, but there is no point reviewing documentation for a flow whose end-to-end correctness is in question. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cmake --installproduced a tree that could not build or run a generated model.Problems
Missing headers. Generated model code includes
visp/nn.hand helpers fromsrc/util/, neither of which was installed.No runner source. There was nothing to compile a generated
<Arch>.cppagainst, so consumers copied a runner out of the source tree by hand.No RUNPATH. The installed
libvisioncpp.sorecordslibggml.so.0inDT_NEEDEDbut had no RUNPATH. Linking succeeds and startup fails:The linker resolves the path CMake gives it at build time; the loader searches again at run time and had nothing to go on. Every consumer worked around it with
LD_LIBRARY_PATH.Changes
src/visp/nn.hand the headers undersrc/util/.tools/verify/backbone/run_dump.cpp, exported asVISP_RUNNERfrom the CMake package config.CMAKE_INSTALL_RPATHto$ORIGIN. ggml installs next tolibvisioncpp, so the loader finds it with no environment variable.The runner gains two switches it needs to be useful outside this tree:
VISP_BACKEND=cpubackend_init()picks an accelerator backend that a build may include but a machine may not have, and that choice fails late and unhelpfully.VISP_DUMP_NODES=<dir><name>.bin. Comparing only the final output says that something diverged, not where.Verification
Built a generated model against the install tree with nothing but:
Before: links, then fails on
libggml.so.0. After: runs and writes its output, noLD_LIBRARY_PATH.objdump -xconfirmsRUNPATH $ORIGINon the installed library.Independent of #12 and #13.
🤖 Generated with Claude Code